<%-- 
    Document   : customerexpand
    Created on : Aug 11, 2012, 10:19:09 AM
    Author     : ems
--%>


<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="f" uri="http://java.sun.com/jsf/core" %>
<%@taglib prefix="h" uri="http://java.sun.com/jsf/html" %>
<%@taglib prefix="rich" uri="http://richfaces.org/rich" %>
<%@taglib prefix="a4j" uri="http://richfaces.org/a4j" %>

<html>
    <head>

        <script type="text/javascript" language="javascript" src="../scripts/jQuery/confirm.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jquery.fancybox-1.3.4.pack.js"></script>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/jq.date.js"></script>
        <link rel="stylesheet" type="text/css" href="../css/ui.datepicker.css"/>
        <link rel="stylesheet" type="text/css" href="../css/thickbox.css"/>
        <link rel="stylesheet" type="text/css" href="../css/paging.css"/>
        <link rel="stylesheet" type="text/css" href="../css/cssdivtable.css"/>
        <script type="text/javascript" language="javascript" src="../scripts/jQuery/thickbox.js"></script>
        <script type="text/javascript" language="javascript">
            var open_cur = 0;
            $j = jQuery.noConflict();
            $j(document).ready(function(){
                $j('input#dateStart,input#dateStart1, input#dateEnd').datepicker({ dateFormat: 'dd/mm/yy', showOn: 'button', buttonImage: '../images/calenda_icon.gif', buttonImageOnly: true }); 
                $j('.keysearch').live('keyup',function(){
                    if($j('.keysearch').val() == ""){
                        $j('.rich-table-row').show();
                                   
                    }else{
                        $j('.rich-table-row').hide();
                        $j('.rich-table-row').each(function(){
                            html = $j(this).html();
                            if(   ununicode(html).indexOf(  ununicode($j('.keysearch').val()) ) > -1    )  {
                                $j(this).show();
                            }else{
                                $j(this).hide();
                            }
                        });
                    }

                });
                
                $j('.search_boxnew').hide();       
                $j('.sidebar_search').live('click',function(){
                    $j('.search_boxnew').hide();
                    if($j(this).next().hasClass('active')){

                        $j('.search_boxnew').removeClass('active');
                    }else{

                        $j('.search_boxnew').removeClass('active');
                        $j(this).next().addClass('active');
                        $j(this).next().show();
                    }
                });
                $j(".content_right").live("click",function(){
                    $j('.search_boxnew').hide();
                });
                $j('.feild_sex').live('click',function(){
                    if(document.forms['financial']['financial:go'][0].checked == true ){
                        $j('.add').hide();
                    }
                    if(document.forms['financial']['financial:go'][1].checked == true ){
                        $j('.add').show();
                             
                    }
                });
                
                $j('.buttonsearch').live('click',function(){
                    $j('.group').show();
                    $j('.closeGroup').show();
                    
                });
                $j('.closeGroup').live('click',function(){
                    $j('.group1').hide();
                    $j(this).parent().hide();
                  
                });
                $j('#group-close').live('click', function(){
                    window.location.href="financialAccount.jsp";
                });
            });
                    
        </script>
        <script type="text/javascript">
            $j(document).ready(function(){
                initThickBox('.thickbox');
            });
            
        </script>



    </head>


    <body>

        <a4j:form id="financial">
            <f:loadBundle basename="#{environmentSession.localizationSource}" var="locale"/>
            <h:outputText value="<div class='permission' lang='#{loginSession.right.MNU_FAC_VIE}'></div>" escape="false"/>
            <div id="content">
                <div id="menu_top">
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#"><span>Khu vực</span></a>
                        </div>
                        <div class="select_hidden">
                            <ul>

                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <div class="dropdown">
                        <div class="select_choise">
                            <a href="#"><span>Outlets</span></a>
                        </div>
                        <div class="select_hidden">
                            <ul>
                                <li><a href="#"><span>Ban Ðiều Hành</span></a></li>
                                <li><a href="#"><span>Nhóm IT</span></a></li>
                                <li><a href="#"><span>Filter Cấp 3</span></a></li>
                            </ul>
                        </div>
                    </div>
                    <div style="float:left;margin-right: 2px;margin-left: 2px;" class="imgFancybox">
                        <h:outputLink  rendered="#{loginSession.right.FAC_LST_CRE}" value="financialAccountInputcreate.jsp?action=addEmp&height=282px&width=345px" styleClass="fancybox" id="fancybox">
                            <h:graphicImage title="Lập phiếu thu/chi" value="../images/icon_addTour.png"/>
                        </h:outputLink>


                    </div>
                  
                    <div style="float:left;margin-left: 2px;margin-right: 2px;">
                        <div class="sidebar_row2" style="margin-bottom: 0;">
                            <h:panelGroup>

                                <div class="sidebar" style="width:0%;">
                                    <div class="sidebar_search">

                                    </div>
                                    <div class="search_boxnew" style="display:none;">
                                        <rich:tabPanel switchType="client">
                                            <rich:tab label="Tìm kiếm nâng cao">
                                                <%--                                                <div style="width:100%;float: left;margin-top: 5px;margin-bottom: 5px;">
                                                                                                    <a4j:outputPanel layout="block">
                                                                                                        <rich:calendar  value="#{customerExpand.dateStatus}" id="calendar" locale="US" popup="true" datePattern="dd/MM/yyyy" showApplyButton="false" cellWidth="24px" cellHeight="21px">
                                                                                                        </rich:calendar>
                                                                                                    </a4j:outputPanel>
                                                                                                </div>
                                                                                                <div style="width:100%;float: left;">
                                                                                                    <a4j:outputPanel layout="block">
                                                                                                        <rich:calendar  value="#{customerExpand.endDateSta}" id="calendar1" locale="US" popup="true" datePattern="dd/MM/yyyy" showApplyButton="false" cellWidth="24px" cellHeight="21px">
                                                                                                        </rich:calendar>
                                                                                                    </a4j:outputPanel>
                                                                                                </div> 
                                                                                                <div style="width:100%;float: left;margin-top: 5px;margin-bottom: 5px;">
                                                                                                    <a4j:commandButton style="width:35px;" onclick="showPleaseWait();" oncomplete="hidePleaseWait();"  actionListener="#{customerExpand.reloadfordata}" value="Tìm" >

                                                    </a4j:commandButton></div>--%>
                                            </rich:tab>
                                        </rich:tabPanel>

                                    </div>
                                </div>
                            </h:panelGroup>
                        </div>
                    </div>
                    <div class="groupcontanersearch">
                        <h:inputText style="  float: left;height: 25px; margin-left: 0;width: 86%;"  value="#{CustomerBean.keySearch}" onfocus="if(this.value=='#{CustomerBean.keySearch}')this.value='';" styleClass="text_search"/>

                        <div class="buttonsearch" style="margin-left:5px; float:left; border-radius:8px 8px 8px 8px; ">
                            <div class="group cssgroup"  >
                                <h:selectOneRadio layout="pageDirection" value="#{CustomerBean.typeSearch}" styleClass="feild_sex"  style="margin-left:5px; margin-top:14px; padding:15px; width:195px; height:154px;"   >
                                    <f:selectItem  itemValue="0" itemLabel="#{locale.all}" />
                                    <f:selectItem itemValue="1" itemLabel="Thu (TM/CK)"/>
                                    <f:selectItem itemValue="2" itemLabel="Chi (TM/CK)"/>
                                    <f:selectItem itemValue="3" itemLabel="Thu (Tạm ứng)"/>
                                    <f:selectItem itemValue="4" itemLabel="Chi (Tạm ứng)"/>
                                    <f:selectItem itemValue="5" itemLabel="Code tour"/>

                                </h:selectOneRadio>
                                <h:commandButton action="#{CustomerBean.reload}" value="#{locale.search}" style="margin-left:75px; margin-top:5px;" styleClass="buttonsearch2">
                                </h:commandButton>
                            </div>
                        </div>
                    </div>
                </div>
                <div id="content_detail">
                    <div class="content_right">
                        <div style="width: 100% !important;float:left;">
                            <div class="headerdivtable">
                                <div class="itemheaderdivtable_center" style="width: 2%;">
                                    <h:outputText value="NUM"/>
                                </div>
                                <div class="itemheaderdivtable_center" style="width: 9%;">
                                    <h:outputText value="ACTION"/>
                                </div>
                                <div class="itemheaderdivtable_left" style="width: 10%;">
                                    <h:outputText value="LOẠI GD"/>
                                </div>
                                <div class="itemheaderdivtable_left" style="width: 6%;">
                                    <h:outputText value="CODE TOUR"/>
                                </div>
                                <div class="itemheaderdivtable_center" style="width: 6%;">
                                    <h:outputText value="SỐ TIỀN" />
                                </div>
                                <div class="itemheaderdivtable_left" style="width: 3%;">
                                    <h:outputText value="TIỀN TỆ"/>
                                </div>
                                <div  class="itemheaderdivtable_left" style="width: 5%;">
                                    <h:outputText value="HÓA ĐƠN" />
                                </div>

                                <%-- <div class="itemheaderdivtable_center" style="width: 8%;">
                                <h:outputText value="STATUS"/>
                            </div> --%>
                                <div class="itemheaderdivtable_left" style="width:12%;">
                                    <h:outputText  value="MỤC ĐÍCH"/>
                                </div>
                                <div class="itemheaderdivtable_left" style="width:16%;">
                                    <h:outputText  value="NOTE"/>
                                </div>
                                <div class="itemheaderdivtable_left" style="width:6%;">
                                    <h:outputText  value="NGÀY LẬP"/>
                                </div>
                                <div class="itemheaderdivtable_left" style="width: 14%;">
                                    <h:outputText value="KTRA/XNHAN"/>
                                </div>
                                <div class="itemheaderdivtable_left" style="width: 8%;">
                                    <h:outputText value="NGƯỜI LẬP"/>
                                </div>
                            </div>
                            <h:panelGroup id="reloadcustomer">
                                <div class="headerdivtable_over">
                                    <a4j:repeat  value="#{T950Bean.listT950}" var="item" rowKeyVar="index">    
                                        <div class="headerdivtable_bootom <h:outputText rendered="#{index%2 !=0}"  value="headerdivtable_tr"/>">
                                            <div class="itemheaderdivtable_center " style="width: 2%;color:#0055A6;">
                                                <h:outputText value="#{index+CustomerBean.offset+1}" >
                                                    <f:convertNumber  pattern="##000"></f:convertNumber>
                                                </h:outputText>
                                            </div>
                                            <div class="itemheaderdivtable_center " style="width: 9%;margin-top: 4px;">

                                                <h:panelGroup rendered="#{loginSession.right.FAC_LST_MOD}">
                                                  
                                                        <h:outputLink style="float:left;margin-right: 1px;" rendered="#{item.ht == null}"  value="financialAccountInput.jsp?action=edit&pt950=#{item.pt950}&height=282px&width=345px" styleClass="fancybox">
                                                            <img src="../images/edit.png" alt="edit" title="edit"/>
                                                        </h:outputLink>


                                                </h:panelGroup>
                                                <h:panelGroup rendered="#{loginSession.right.FAC_LST_DEL}">

                                                    <h:outputLink style="float:left;margin-right: 1px;" value="deleteFinancial.jsp?action=delete&pt950=#{item.pt950}&height=282px&width=345px" styleClass="fancybox ">
                                                        <img src="../images/delete_1.png" alt="delete"  title="delete" />
                                                    </h:outputLink>


                                                </h:panelGroup>
                                                <h:outputLink style="float:left;margin-right: 1px;" value="uploadfile.jsp?pc150=&page=financialAccount.jsp&type=ALL&table=T950&KeepThis=true&amp;TB_iframe=true&amp;height=350&amp;width=550&amp;modal=true" styleClass="thickbox add_new">
                                                    <img  src="../images/docs_icon.png" height="15px" width="15px" title="Add document"/> 
                                                </h:outputLink>
                                                <h:outputLink style="float:left;margin-right: 1px;"   value="documentView_infanial.jsp?action=getinfomationEmp&pt950=#{item.pt950}">
                                                    <img src="../images/eye.png" title="Xem phiếu" />
                                                </h:outputLink>
                                                <div style="background-color: <h:outputText rendered="#{item.ht != null}" value="#E6E9EB"/>">
                                                    <div style="background-color:<h:outputText rendered="#{item.ht1 != null}" value="#BBBDBF"/>;">
                                                        <h:panelGroup rendered="#{loginSession.right.DEB_LST_DKD}">
                                                            <h:outputLink style="float:left;margin-right: 1px;" disabled="#{item.flagforT9501}" rendered="#{item.ht == null}"  value="confirm.jsp?pt950=#{item.pt950}&table=flau&page=tk.jsp&height=150px&width=300px" styleClass="fancybox" >
                                                                <img  src="../images/check_alt.png" alt="Kiểm duyệt" style="padding-right:6px;" title="Kiểm duyệt" />                                               
                                                            </h:outputLink>
                                                            <h:outputLink style="float:left;margin-right: 1px;" disabled="true" rendered="#{item.ht != null}"  value="confirm.jsp?pt950=#{item.pt950}&table=flau&page=tk.jsp&height=150px&width=300px" styleClass="fancybox" >
                                                                <img  src="../images/check_false.png" alt="Kiểm duyệt"  title="Kiểm duyệt" />                                               
                                                            </h:outputLink>

                                                        </h:panelGroup>
                                                        <h:panelGroup rendered="#{loginSession.right.DEB_LST_DXN}">
                                                            <h:outputLink style="float:left;margin-right: 1px;" disabled="#{item.flagforT950}"  rendered="#{item.ht1 == null}" value="confirm.jsp?pt950=#{item.pt950}&table=appro&page=tk.jsp&height=150px&width=300px" styleClass="fancybox" >
                                                                <img src="../images/tick_circle.png" alt="Xác nhận" title="Xác nhận" />                                               
                                                            </h:outputLink>
                                                            <h:outputLink style="float:left;margin-right: 1px;" disabled="true" rendered="#{item.ht1 != null}"  value="confirm.jsp?pt950=#{item.pt950}&table=flau&page=tk.jsp&height=150px&width=300px" styleClass="fancybox" >
                                                                <img  src="../images/check_false.png" alt="Xác nhận"  title="Xác nhận" />                                               
                                                            </h:outputLink>
                                                        </h:panelGroup>
                                                    </div>
                                                </div>
                                            </div>

                                            <div class="itemheaderdivtable_left " style="width: 10%;">
                                                <h:outputText value="#{item.tv001}"/>
                                            </div>
                                            <div class="itemheaderdivtable_left " style="width: 6%;">
                                                <div style="width: 100%">
                                                    <h:panelGroup rendered="#{item.bv051!=null}"> <h:outputText value="#{item.bv051}"/> </h:panelGroup>
                                                        <h:panelGroup rendered="#{item.bv051==null}"> <h:outputText value="&nbsp" escape="false"/> </h:panelGroup>
                                                </div>
                                            </div>
                                            <div class="itemheaderdivtable_right " style="width: 6%;">
                                                <h:outputText value="#{item.tn951st}"/>  
                                            </div>
                                            <div class="itemheaderdivtable_center " style="width: 3%;">
                                                <h:outputText value="#{item.money}"/> 
                                            </div>
                                            <div  class="itemheaderdivtable_left " style="width: 5%;">
                                                <h:outputText value="#{item.tv969}"/> 
                                            </div>
                                            <%--    <div class="itemheaderdivtable_left " style="width: 8%;">
                                            <h:outputText  value="#{item.kv301}"/>
                                        </div>--%>

                                            <div class="itemheaderdivtable_left " style="width:12%;">
                                                <h:outputText value="#{item.tv076}"/> 
                                            </div>
                                            <div class="itemheaderdivtable_left " style="width:16%;">
                                                <h:outputText value="#{item.tv971}"/> 
                                            </div>
                                            <div class="itemheaderdivtable_left " style="width: 6%;">
                                                <h:outputText value="#{item.td954}"> <f:convertDateTime pattern="dd/MM/yyyy"/></h:outputText> 
                                                </div>
                                                <div class="itemheaderdivtable_left " style="width: 14%;">
                                                <h:outputText value="#{item.td964St}"><f:convertDateTime type="TIMESTAMP" pattern="MM/dd/yyyy HH:mm:ss" /> </h:outputText></br>
                                                &nbsp;&nbsp; <h:outputText value="#{item.ht}"/> 
                                                <h:outputText value="#{item.td966St}"/> </br>
                                                &nbsp;&nbsp;  <h:outputText value="#{item.ht1}"/>
                                            </div>
                                            <div class="itemheaderdivtable_left " style="width: 8%;line-height: 12px;font-size: 8px">
                                                <h:outputText value="#{item.tl998}"/> </br>
                                               (<h:outputText value="#{item.tl999}"/>)
                                            </div>
                                        </div>
                                        <div class="noteContent">

                                        </div>
                                    </a4j:repeat>
                                </div>
                            </h:panelGroup>
                        </div>
                    </div>
                </div>
            </div>

        </a4j:form>

    </body>
</html>
<style type="text/css">


    #main{
        width:100%;
    }
    #content{
        padding: 0 !important;
        width: 98.8%;
    }
    #footer{
        width:100%;
    }
    .title_tour{
        width:100%;
    }

    #content_detail {
        float: left;
        width: 100%;
    }


    #header_content {
        float: right;
        margin-top: 40px;
        width: 87%;
    }
    .rich-dtascroller-table {
        background-color: #FFFFFF;
        border-color: #82A6C7;
        float: right;
        margin-right: 0 !important;
        margin-top: 10px !important;
    }
    .rich-table-cell 
    {
        border-bottom: 1px solid #C4C0C9;
        border-right: 1px solid #C4C0C9 ;
        color: #000000;
        font-family: Arial,Verdana,sans-serif;
        font-size: 11px;
        padding: 0px !important;
    }
    .content .scrolls{
        width:800px !important;
        float:left;

        overflow:auto;
    }
    .content .rich-table{
        width:800px !important;
        float:left;

        overflow:auto;
    }
    .content table{
        width:800px !important;
        float:left;
    }
    .content_table {
        width:100% !important;
        float:left;

        overflow:auto;
    }

    .text_center{
        text-align: center;
    }
    .text_right{
        text-align: right;
    }
    .date_test{
        height: 32px;
        width:250px;
        text-align: center;
    }
    .loaigd{
        padding: 9px;              
        width:129px;
        height: 14px;
    }
    .matour{
        padding: 9px;
        width:150px;
        height: 14px;
    }
    .tongchiphi{
        padding: 9px;
        width:100px;
        height: 14px;
    }
    .tiente{
        padding: 9px;
        width:23px;
        height: 14px;
    }

    .tiente1{
        padding: 9px;
        width:100px;
        height: 14px;
        text-align: left;
    }
    .status{
        padding: 9px;
        text-align: center;
        width:22px;
        height: 14px;
    }
    .mota{
        padding: 9px;
        width:250px;
        height: 14px;
    }
    .ngayhieuluc{
        padding: 9px;
        width:58px;
        text-align: center;
        height: 14px;
    }
    .ngaylap{
        padding: 9px;
        width:57px;
        text-align: center;
        height: 14px;
    }
    .ngayxacnhan{
        height: 32px;
        text-align: center;
        width:250px;
    }

    .kiemduyet{
        text-align: center;
        width:63px;
        height: 32px;
    }
    .ngaycapnhat{
        padding: 9px;
        text-align: center;
        width: 250px;
        height: 14px;
    }
    .sua{
        height: 32px;
        text-align: center;
        width:60px;
    }
    .tailieu{
        width:55px;
        text-align: center;
        height: 32px;
    }


    .feild_sex td label{width: 150px !important; color:white; font-size:12px; text-transform: none; margin-left:3px;}

    .buttonsearch2{
        border:0;
        background:url(../images/bg_submit.gif) repeat-x;
        width:68px;

        margin:0px 0 10px 20px;
        color:#ffffff;
        font-size:12px;
        font-weight:bold;
        cursor:pointer;
        border-radius:2px;
        padding:4px 0;
        text-transform:uppercase;
    }
    input{
        float:left;
        margin-left:9px;
    }
    .sidebar_search {
        background: url("../images/searchnew.png") no-repeat scroll 100% 0 transparent;
        border: 0 none;
        cursor: pointer;
        height: 26px !important;
        margin-top: 0;
        padding-right: 31px;
    }
    .cssgroup {
        background: none repeat scroll 0 0 #2B3844;
        color: white;
        display: none;
        height: 213px;
        margin-left: -117px;
        position: absolute;

        top:66px;
        width: 150px;
        z-index: 999;
    }
    .closeGroup{
        float: right;
        font-size: 14px;
        margin-right: 5px;
        width:150px;
        height:auto;
        position:absolute;
        background: #2B3844;
        color:white !important;
        top:30px;
        display:none;
        text-align: right;
    }
    .imgFancybox img{
        height: 26px;
        width: 26px;
    }
</style>

